<include file="public:header"/>

<notempty name="apply['Subsite']">
    <div class="seltpye_x">
        <div class="left">所属分站</div>
        <qscms:subsite 列表名="subsite_list"/>
        <div class="right">
            <a href="{:P(array('subsite_id'=>''))}" <eq name='Think.get.subsite_id' value=''>class="select"</eq>>不限</a>
            <if condition="$visitor['role_id'] eq 1">
                <volist name="subsite_list" id="subsite">
                    <a href="{:P(array('subsite_id'=>$subsite['s_id']))}" <if condition="$Think.get.subsite_id eq $subsite['s_id']">class="select"</if>>{$subsite.s_sitename}</a>
                </volist>
            <else/>
                <volist name="subsite_list" id="subsite">
                    <if condition="in_array($subsite['s_id'],$visitor['subsite'])">
                        <a href="{:P(array('subsite_id'=>$subsite['s_id']))}" <if condition="$Think.get.subsite_id eq $subsite['s_id']">class="select"</if>>{$subsite.s_sitename}</a>
                    </if>
                </volist>
            </if>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
</notempty>
<div class="seltpye_x">
    <div class="left">审核状态</div>
    <div class="right">
        <a href="{:P(array('audit'=>''))}" <eq name='Think.get.audit' value=''>class="select"</eq>>不限</a>
        <a href="{:P(array('audit'=>'1'))}" <eq name='Think.get.audit' value='1'>class="select"</eq>>审核通过</a>
        <a href="{:P(array('audit'=>'2'))}" <eq name='Think.get.audit' value='2'>class="select"</eq>>等待审核</a>
        <a href="{:P(array('audit'=>'3'))}" <eq name='Think.get.audit' value='3'>class="select"</eq>>审核未通过</a>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<div class="seltpye_x">
    <div class="left">添加时间</div>
    <div class="right">
        <a href="{:P(array('settr'=>''))}" <eq name='Think.get.settr' value=''>class="select"</eq>>不限</a>
        <a href="{:P(array('settr'=>'3'))}" <eq name='Think.get.settr' value='3'>class="select"</eq>>三天内</a>
        <a href="{:P(array('settr'=>'7'))}" <eq name='Think.get.settr' value='7'>class="select"</eq>>一周内</a>
        <a href="{:P(array('settr'=>'30'))}" <eq name='Think.get.settr' value='30'>class="select"</eq>>一月内</a>
        <a href="{:P(array('settr'=>'90'))}" <eq name='Think.get.settr' value='90'>class="select"</eq>>三月内</a>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>

<form id="form1" name="form1" method="post" action="{:U('delete')}">
    <input name="utype" type="hidden" value="2">
    <div class="toptit nomargin">
        <label id="chkAll" class="left_padding">
            <input type="checkbox" name="chkAll" id="chk" title="全选/反选"/>附件作品
        </label>
    </div>
    <div class="imglist">
        <volist name="list" id="vo">
            <div class="li">
                <div class="checkbox">
                    <input name="id[]" type="checkbox" id="id" value="{$vo['id']}"/>
                </div>
                <a href="javascript:void(0);" class="audit" id="setAudit" data-param="id[]={$vo['id']}&utype=2">
                    <if condition="$vo['audit'] eq '1'"><span style="color: #99FF00">审核通过</span></if>
                    <if condition="$vo['audit'] eq '2'"><span style="color:#FF6600">等待审核</span></if>
                    <if condition="$vo['audit'] eq '3'"><span style="color:#FF0000">审核未通过</span></if>
                </a>
                <a href="{:attach($vo['img'],'resume_img')}" target="_blank">
                    <img src="{:attach($vo['img'],'resume_img')}" border="0" align="absmiddle" />
                </a>
                <div class="imgfoot link_w">
                    <div class="date">{$vo.addtime|date="Y-m-d H:i",###}</div>
                    <div class="manager"><a href="javascript:void(0);" class="userinfo" parameter="uid={$vo['uid']}" hideFocus="true">管理</a></div>
                    <div class="del"><a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('你确定要删除吗？')">删除</a></div>
                </div>
            </div>
        </volist>
        <div class="clear" <notempty name="list">style="height:20px;"</notempty>></div>
    </div>
</form>

<empty name="list">
    <div class="list_empty">没有任何信息！</div>
</empty>

<div class="list_foot">
    <div class="btnbox">
        <input type="button" class="admin_submit" id="ButAudit" value="审核图片"/>
        <input type="button" class="admin_submit" id="ButDel" value="删除"/>
    </div>

    <div class="footso">
        <form action="?" method="get">
            <div class="sobox">
                <input type="hidden" name="m" value="{:C('admin_alias')}">
                <input type="hidden" name="c" value="{:CONTROLLER_NAME}">
                <input type="hidden" name="a" value="{:ACTION_NAME}">
                <input name="key" type="text" class="sinput" value="{$Think.get.key}"/>
                <input name="key_type" id="J_key_type_id" type="hidden" value="{$Think.get.key_type|default='1'}" />
                <input name="key_type_cn" id="J_key_type_cn" type="hidden" value="{$Think.get.key_type_cn|default='简历标题'}"/>
                <input name="" type="submit" value="" class="sobtn"/>
                <div class="sotype" id="J_key_click">{$Think.get.key_type_cn|default='简历标题'}</div>
                <div class="mlist" id="J_mlist">
                    <ul>
                        <li id="1" title="简历标题">简历标题</li>
                        <li id="2" title="简历姓名">简历姓名</li>
                        <li id="3" title="简历ID">简历ID</li>
                        <li id="4" title="照片描述">照片描述</li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="pages">{$page}</div>

</div>
<include file="public:footer"/>

</body>
<script type="text/javascript">
    $(document).ready(function () {
        //单个审核
        $("#setAudit").live('click',function () {
            var qsDialog = $(this).dialog({
                title: '审核照片',
                loading: true,
                footer : false
            });
            var param = $(this).data('param');
            //alert(param);return;
            var url = "{:U('Ajax/img_audit')}&" + param;
            $.getJSON(url, function (result) {
                if(result.status == 1){
                    qsDialog.setContent(result.data);
                } else {
                    qsDialog.hide();
                    disapperTooltip('remind',result.msg);
                }
            });
        });
        //批量审核
        $("#ButAudit").click(function () {
            var ids = $("input[name='id[]']:checked");
            //alert(ids.length);return;
            if(ids.length == 0){
                disapperTooltip('remind','请选择照片！');
            } else {
                var qsDialog = $(this).dialog({
                    title: '审核照片',
                    loading: true,
                    footer : false
                });
                var data = $("form[name=form1]").serialize();
                var url = "{:U('Ajax/img_audit')}";
                $.post(url, data, function (result) {
                    if(result.status == 1){
                        qsDialog.setContent(result.data);
                    } else {
                        qsDialog.hide();
                        disapperTooltip('remind',result.msg);
                    }
                });
            }
        });
        //管理
        $(".userinfo").click(function () {
            var qsDialog = $(this).dialog({
                title: '管理',
                loading: true,
                footer : false
            });
            var param = $(this).attr('parameter');
            var url = "{:U('Ajax/userinfo')}&" + param;
            $.getJSON(url, function (result) {
                qsDialog.setContent(result.data);
            });
        });
        //批量删除
        $("#ButDel").click(function () {
            var ids = $("input[name='id[]']:checked");
            if(ids.length == 0){
                disapperTooltip('remind','请选择图片！');
            } else {
                if(confirm('确定删除吗？')){
                    $("#form1").submit();
                }
            }
        });
    });
</script>
</html>